import request from '@/util/request'
import store from '@/vuex/store'

export function getMaxTimeListPageApi() {
    const value = {
        
        appKey: '',
        appFlag: 2,
        token: store.getters.token,
        versionCode: 0
    }
    return request({
        url: "maxTime/getMaxTimeListPage.do",
        method: "post",
        data: value
    })
    // return request({
    //     url: "maxTime/getMaxTimeListPage.do", method: 'post',
    //     data: {
    //         token: store.getters.token,
    //         pageSize: list.pageSize,
    //         currentPage: list.currentPage
    //     }
    // })
}

export function updateMaxTimeByState(maxDetail) {
    const value = {
        appKey: '',
        appFlag: 2,
        token: store.getters.token,
        versionCode: 0,
        param: JSON.stringify(maxDetail)
    }
    return request({
        url: 'maxTime/updateMaxTimeByState.do',
        method: 'post',
        data: value
    })
    // return request({
    //     url: "maxTime/updateMaxTimeByState.do",
    //     method: 'post',
    //     data: {
    //         token: store.getters.token,
    //         maxDetail: JSON.stringify(maxDetail),
    //     }
    // })
}

export function removeMaxTimePro(id) {
    const value = {
        appKey: '',
        appFlag: 2,
        token: store.getters.token,
        versionCode: 0,
        param: JSON.stringify(id)
    }
    return request({
        url: "maxTime/removeMaxTimePro.do",
        method: "post",
        data: value
    })
}
export function getWarningTimeListPageApi() {
    const value = {
        
        appKey: '',
        appFlag: 2,
        token: store.getters.token,
        versionCode: 0
    }
    return request({
        url: "warning/getWarningTimeListPage.do",
        method: "post",
        data: value
    })
}
export function updateWarningTimeByName(maxDetail) {
    const value = {
        appKey: '',
        appFlag: 2,
        token: store.getters.token,
        versionCode: 0,
        param: JSON.stringify(maxDetail)
    }
    return request({
        url: 'warning/updateWarningTimeByName.do',
        method: 'post',
        data: value
    })
    
}

